26. Text: Marks & Filters II
Text for Previous Video
Filters
One of my favorite features of Tableau is the ability to quickly make interactive filters. This way you can view only the data you're interested in and allow your users to do the same.
Filtering basics
There are a few different ways to create filters. First, you can make a filter directly from the view. Suppose you have something like the image below where there are a lot of visual elements and you want to pare it down.
You can filter directly from this view by selecting the data, right clicking to open the context menu, and creating a filter. I chose a few categories I wanted to keep.
Above you see I can select "Keep only" which filters out everything other than the selected values. I can also choose to exclude the selected values. I'm going to choose "Keep only" here.
There is now a Sub-Category pill in the Filters shelf since I am filtering on that field. Now there are still a lot of regions, so I'm going to choose only a few to look at. Filters can also be created by dragging a field to the Filters shelf.
If you do this too, a menu should pop up. There are four different tabs here that let you filter in different ways. Here I'm just going to select four of the regions.
And finally, this is what it looks like with everything filtered.
Interactive filters
This is a static filter which you set in the menu and if you want to change it, you have to go back into the menu. Tableau does something cool here. It let's you make the filter interactive and control it from the view.
To do this open the menu on the Region pill in the Filters shelf. You should see this:
Clicking "Show Filter" brings out a control for the filter (you can see it on the right in the image below).
You can change the way you control the filter by opening the menu on the controls, click the little triangle.
Try out the different options to see what they do. I chose the Multiple Values (dropdown) to save on screen space.
Now it's a dropdown menu where I can select the regions I want to see in the view.
More on filters
Interactive filters like these are one of Tableau's most powerful features. Tableau has a series of great tutorial videos going into more detail which you can find here. You might have to create an account, but you'll want to anyway, there are a lot of excellent tutorial videos.